import request from '@/utils/request'

// 查询商品三级分类列表(树形结构)
export function children() {
  return request({
    url: '/product//category/children',
    method: 'get',
  })
}

// 新增商品三级分类
export function add(data) {
  return request({
    url: '/product//category',
    method: 'post',
    data: data,
  })
}

// 修改商品三级分类
export function edit(data) {
  return request({
    url: '/product//category',
    method: 'put',
    data: data,
  })
}

//删除商品三级分类
export function remove(catIds) {
  return request({
    url: '/product/category/'+catIds,
    method: 'delete'
  })
}

//获取商品三级分类详细信息
export function getInfo(catId) {
  return request({
    url: '/product/category/'+catId,
    method: 'get'
  })
}

//批量修改商品三级分类
export function updatePmsCategoryList(data) {
  return request({
    url: '/product/category/updatePmsCategoryList',
    method: 'post',
    data:data
  })
}

//批量修改商品三级分类
export function removes(data) {
  return request({
    url: '/product/category/removes',
    method: 'post',
    data:data
  })
}
